package io.github.openfeign.soap;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.Arrays;
import java.util.List;

@XmlRootElement(namespace = "http://WebXml.com.cn/")
public class GetSupportCityResponse {
    List<String> getSupportCityResult;

    @XmlElementWrapper(name = "getSupportCityResult",namespace = "http://WebXml.com.cn/")
    @XmlElement(name = "string",namespace = "http://WebXml.com.cn/")
    public List<String> getGetSupportCityResult() {
        return getSupportCityResult;
    }

    public void setGetSupportCityResult(List<String> getSupportCityResult) {
        this.getSupportCityResult = getSupportCityResult;
    }

    public static void main(String[] args) throws JAXBException {
        List<String> cities = Arrays.asList("xx","bb");
        GetSupportCityResponse resp = new GetSupportCityResponse();
        resp.setGetSupportCityResult(cities);
        JAXBContext.newInstance(GetSupportCityResponse.class).createMarshaller().marshal(resp,System.out);
    }
}
